<?php
/**
 * @Name: RoleSaveRequest.php
 * @Author: yashuai
 * @Desc: 添加编辑角色
 */

namespace App\Http\Requests\Rbac;

use App\Http\Requests\PackingRequest;

class RoleSaveRequest extends PackingRequest
{

    public function rules()
    {
        return [
            'RoleName'   => 'required|max:50',
            'RoleDesc'   => 'required|max:500',
            'RoleStatus' => 'integer|in:1,2',
        ];
    }

    public function messages()
    {
        return [
            'RoleID.required'    => '缺少记录ID参数',
            'RoleID.integer'     => '记录ID参数类型异常',
            'RoleName.required'  => '请输入角色名',
            'RoleName.max'       => '角色名过长',
            'RoleDesc.required'  => '请输入角色描述',
            'RoleDesc.max'       => '角色描述过长',
            'RoleStatus.integer' => '角色状态类型异常',
            'RoleStatus.in'      => '角色状态不在范围',
        ];
    }

}
